package com.lkathous.dev.tools;

import com.lkathous.dev.tools.handler.ProjectCompareHandler;

import java.io.IOException;
import java.util.Scanner;

/**
 * @author liaokai
 * @since 2024/4/5 21:47
 */
public class Application {



    public static void main(String[] args) throws IOException {
        System.out.println();
        System.out.println("------====== dev-tools ======------");
        System.out.println();
        // 示例：1 -s /projects/tms-yc/tms-yc-provider/src/main/java/com/kyexpress/erp/tms/yc -t /projects/tms-yc/tms-yc-provider/src/main/java/com/kyexpress/erp/tms/yc
        System.out.println("[1] 目录代码对比 Options: -s对比来源目录 -t对比目标目录");
        System.out.println();

//        String input = scanIn("使用功能：");
        String input = "1";

        if (input.startsWith("1")) {
            // windows
            new ProjectCompareHandler().handle(null);
        }

        System.out.println();
        System.out.println("结束...");
        System.out.println();
    }

    private static String scanIn(String tips) {
        String input = null;
        try (Scanner scanner = new Scanner(System.in)) {
            System.out.print(tips);

            if (scanner.hasNextLine()) {
                input = scanner.nextLine();
            }
        }
        return input;
    }
}
